package com.smart.campus.school.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.smart.campus.school.mapper.AttendanceGroupUserMapper;
import com.smart.campus.school.domain.AttendanceGroupUser;
import com.smart.campus.school.service.IAttendanceGroupUserService;
import com.smart.campus.common.core.text.Convert;

/**
 * 考勤组人员Service业务层处理
 * 
 * @author Zhihe.Li
 * @date 2020-10-21
 */
@Service
public class AttendanceGroupUserServiceImpl implements IAttendanceGroupUserService 
{
    @Autowired
    private AttendanceGroupUserMapper attendanceGroupUserMapper;

    /**
     * 查询考勤组人员
     * 
     * @param id 考勤组人员ID
     * @return 考勤组人员
     */
    @Override
    public AttendanceGroupUser selectAttendanceGroupUserById(Long id)
    {
        return attendanceGroupUserMapper.selectAttendanceGroupUserById(id);
    }

    /**
     * 查询考勤组人员列表
     * 
     * @param attendanceGroupUser 考勤组人员
     * @return 考勤组人员
     */
    @Override
    public List<AttendanceGroupUser> selectAttendanceGroupUserList(AttendanceGroupUser attendanceGroupUser)
    {
        return attendanceGroupUserMapper.selectAttendanceGroupUserList(attendanceGroupUser);
    }

    /**
     * 新增考勤组人员
     * 
     * @param attendanceGroupUser 考勤组人员
     * @return 结果
     */
    @Override
    public int insertAttendanceGroupUser(AttendanceGroupUser attendanceGroupUser)
    {
        return attendanceGroupUserMapper.insertAttendanceGroupUser(attendanceGroupUser);
    }

    /**
     * 修改考勤组人员
     * 
     * @param attendanceGroupUser 考勤组人员
     * @return 结果
     */
    @Override
    public int updateAttendanceGroupUser(AttendanceGroupUser attendanceGroupUser)
    {
        return attendanceGroupUserMapper.updateAttendanceGroupUser(attendanceGroupUser);
    }

    /**
     * 删除考勤组人员对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteAttendanceGroupUserByIds(String ids)
    {
        return attendanceGroupUserMapper.deleteAttendanceGroupUserByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除考勤组人员信息
     * 
     * @param id 考勤组人员ID
     * @return 结果
     */
    @Override
    public int deleteAttendanceGroupUserById(Long id)
    {
        return attendanceGroupUserMapper.deleteAttendanceGroupUserById(id);
    }
}
